package models;

import com.sqss.SQSS;

import java.util.List;

public class Student extends SQSS {
     int id;
     String name;
     int age;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static void main(String []args){
        Student s = new Student();
        s.age= 18;
        s.name ="小明同学";
        s.id =1 ;
      //  SQSS.update(s,"name","age");
        List<Student> read = SQSS.read(s, "name", "age");
        System.out.println(read);

        // int insert = SQSS.insert(s);
       // System.out.println(s + "  insert "+ insert );

        int insert = SQSS.insert(s);
        System.out.println("insert Student id is "+ s.getId());
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
